package com.sdkj.jiang.service.impl;

import com.sdkj.jiang.dto.EmpDto;
import com.sdkj.jiang.mapper.EmpMapper;
import com.sdkj.jiang.po.Emp;
import com.sdkj.jiang.service.EmpService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class EmpServiceImpl implements EmpService {
    @Resource
    private EmpMapper empMapper;
    @Override
    public List<Emp> search(EmpDto empDto) {

        return empMapper.findByParam(empDto);
    }

    @Override
    public int doDelete(int empno) {
        int row = empMapper.delete(empno);
        return row;
    }

    @Override
    public int doUpdate(EmpDto empDto) {

        return empMapper.update(empDto);
    }
}
